-- GENERATED SPELL FOR [Lokholar the Ice Lord] --


function spell0_13256(pUnit, Event) --@Blizzard,n/a--
pUnit:FullCastSpellOnTarget(21367,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13256', 11000, 1)
end

function spell1_13256(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(14907,pUnit)
pUnit:RegisterEvent('Sorts_13256', 8287, 1)
end

function spell2_13256(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(19133,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13256', 8272, 1)
end

function spell3_13256(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(21369,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13256', 5500, 1)
end

function spell4_13256(pUnit, Event) --@Ice Tomb,n/a--
pUnit:FullCastSpellOnTarget(16869,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13256', 11500, 1)
end

function spell5_13256(pUnit, Event) --@Swell of Souls,n/a--
pUnit:FullCastSpellOnTarget(21307,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13256', 557, 1)
end

function Sorts_13256(pUnit, Event)
local choix_sorts_13256 = math.random(0, 5)
if choix_sorts_13256 == 0 then
pUnit:RegisterEvent('spell0_13256', 1, 1)
end
if choix_sorts_13256 == 1 then
pUnit:RegisterEvent('spell1_13256', 1, 1)
end
if choix_sorts_13256 == 2 then
pUnit:RegisterEvent('spell2_13256', 1, 1)
end
if choix_sorts_13256 == 3 then
pUnit:RegisterEvent('spell3_13256', 1, 1)
end
if choix_sorts_13256 == 4 then
pUnit:RegisterEvent('spell4_13256', 1, 1)
end
if choix_sorts_13256 == 5 then
pUnit:RegisterEvent('spell5_13256', 1, 1)
end
end

function mob13256_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_13256', math.random(1500, 3000), 1)
end

function mob13256_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13256_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13256_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(13256, 1, 'mob13256_Action')
RegisterUnitEvent(13256, 2, 'mob13256_Leave')
RegisterUnitEvent(13256, 3, 'mob13256_Kill')
RegisterUnitEvent(13256, 4, 'mob13256_Die')
